package com.soboot.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.soboot.system.entity.SysMenu;
import com.soboot.system.model.QueryMenuListReqModel;
import com.soboot.system.vo.QueryMenuListVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @Author:
 * @createTime: 2022年09月20日 18:09:43
 * @version:
 * @Description: 菜单mapper
 * @Copyright:
 */
@Repository
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    List<QueryMenuListVO> getMenuListByUserId(Integer userId);

    List<QueryMenuListVO> getMenuList(@Param("param") QueryMenuListReqModel queryMenuListReqModel);

    List<SysMenu> getMenuByUserIdAndParentId(@Param("parentId") Integer parentId, @Param("userId") Integer tokenUserId);

    List<Integer> getCheckKeys(@Param("roleId") Integer roleId);

    List<SysMenu> selectMenuByRoleIds(@Param("roleIds") List<String> roleIds);

    List<SysMenu> selectMenuByUserId(@Param("userId") String userId);
}
